package edit;

import org.jbox2d.common.Vec2;

import java.awt.geom.Ellipse2D;
import java.awt.*;

/**
 * @author will
 * @date Aug 10, 2008 5:20:21 PM
 */
public class DrawEllipseContext extends DrawShapeContext {
    public Shape createShape() {
        return new Ellipse2D.Float();
    }

    public Shape setShape(Vec2 start, Vec2 now) {
        Ellipse2D.Float aFloat = (Ellipse2D.Float) shape;
        aFloat.setFrameFromDiagonal(start.x, start.y, now.x, now.y);
        return aFloat;
    }
}
